﻿@using InfoTech.VinhSon.Bussiness
@model IEnumerable<Group>
@{
    foreach (Group @group in Model.OrderBy(c => c.Priority ?? int.MaxValue))
    {
        if(group.Layout.Partial == true)
        {
            if(group.FilterByDate == true)
            {
                @Html.Action("FilterDate",
                             "HomeModule",
                             new
                                 {
                                         group
                                 })
            }
            else
            {
                @Html.Action("Basic",
                             "HomeModule",
                             new
                                 {
                                         group
                                 })
            }
        }
        else
        {
            @Html.Action(group.Layout.Action,
                         group.Layout.Controller,
                         new
                             {
                                     area = group.Layout.Area,
                                     group
                             })
        }
    }
}